package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 分销配置实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_distributor_config")
@Schema(name = "YunkeDistributorConfig", description = "分销配置实体")
public class YunkeDistributorConfig implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "配置ID")
    private Long id;

    @Schema(description = "配置名称")
    private String configName;

    @Schema(description = "配置键")
    private String configKey;

    @Schema(description = "配置值")
    private String configValue;

    @Schema(description = "配置类型（1字符串 2数字 3布尔值 4JSON）")
    private Integer configType;

    @Schema(description = "业务类型（1佣金比例 2提现设置 3审核设置 4推广设置）")
    private Integer businessType;

    @Schema(description = "一级分销佣金比例")
    private BigDecimal level1Rate;

    @Schema(description = "二级分销佣金比例")
    private BigDecimal level2Rate;

    @Schema(description = "三级分销佣金比例")
    private BigDecimal level3Rate;

    @Schema(description = "最小提现金额")
    private BigDecimal minWithdrawAmount;

    @Schema(description = "提现手续费比例")
    private BigDecimal withdrawFeeRate;

    @Schema(description = "提现手续费最小值")
    private BigDecimal withdrawFeeMin;

    @Schema(description = "提现手续费最大值")
    private BigDecimal withdrawFeeMax;

    @Schema(description = "是否开启分销功能")
    private Boolean enableDistribution;

    @Schema(description = "是否需要审核")
    private Boolean requireAudit;

    @Schema(description = "申请条件（JSON格式）")
    private String applyConditions;

    @Schema(description = "推广材料（JSON格式）")
    private String promoteMaterials;

    @Schema(description = "配置描述")
    private String configDesc;

    @Schema(description = "是否启用")
    private Boolean enabled;

    @Schema(description = "排序号")
    private Integer sortOrder;

    @Schema(description = "状态（0正常 1删除）")
    private Integer status;

    @Schema(description = "创建时间")
    private Long createTime;

    @Schema(description = "更新时间")
    private Long updateTime;
} 